\(\int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx\) [236]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 51 \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\frac {2 \sqrt {a x^2+b x^3}}{x}-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} x}{\sqrt {a x^2+b x^3}}\right ) \]

[Out]

-2*arctanh(x*a^(1/2)/(b*x^3+a*x^2)^(1/2))*a^(1/2)+2*(b*x^3+a*x^2)^(1/2)/x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2046, 2033, 212} \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\frac {2 \sqrt {a x^2+b x^3}}{x}-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} x}{\sqrt {a x^2+b x^3}}\right ) \]

[In]

Int[Sqrt[a*x^2 + b*x^3]/x^2,x]

[Out]

(2*Sqrt[a*x^2 + b*x^3])/x - 2*Sqrt[a]*ArcTanh[(Sqrt[a]*x)/Sqrt[a*x^2 + b*x^3]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2033

Int[1/Sqrt[(a_.)*(x_)^2 + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[2/(2 - n), Subst[Int[1/(1 - a*x^2), x], x, x/Sq
rt[a*x^2 + b*x^n]], x] /; FreeQ[{a, b, n}, x] && NeQ[n, 2]

Rule 2046

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a*x^j + b
*x^n)^p/(c*(m + n*p + 1))), x] + Dist[a*(n - j)*(p/(c^j*(m + n*p + 1))), Int[(c*x)^(m + j)*(a*x^j + b*x^n)^(p
- 1), x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[p] && LtQ[0, j, n] && (IntegersQ[j, n] || GtQ[c, 0]) && G
tQ[p, 0] && NeQ[m + n*p + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \sqrt {a x^2+b x^3}}{x}+a \int \frac {1}{\sqrt {a x^2+b x^3}} \, dx \\ & = \frac {2 \sqrt {a x^2+b x^3}}{x}-(2 a) \text {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {x}{\sqrt {a x^2+b x^3}}\right ) \\ & = \frac {2 \sqrt {a x^2+b x^3}}{x}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {a x^2+b x^3}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.04 \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\frac {2 x \left (a+b x-\sqrt {a} \sqrt {a+b x} \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )\right )}{\sqrt {x^2 (a+b x)}} \]

[In]

Integrate[Sqrt[a*x^2 + b*x^3]/x^2,x]

[Out]

(2*x*(a + b*x - Sqrt[a]*Sqrt[a + b*x]*ArcTanh[Sqrt[a + b*x]/Sqrt[a]]))/Sqrt[x^2*(a + b*x)]

Maple [A] (verified)

Time = 1.91 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.71

method result size
pseudoelliptic \(-\frac {\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right ) b x +\sqrt {b x +a}\, \sqrt {a}}{x \sqrt {a}}\) \(36\)
default \(-\frac {2 \sqrt {b \,x^{3}+a \,x^{2}}\, \left (\sqrt {a}\, \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )-\sqrt {b x +a}\right )}{x \sqrt {b x +a}}\) \(52\)

[In]

int((b*x^3+a*x^2)^(1/2)/x^2,x,method=_RETURNVERBOSE)

[Out]

-(arctanh((b*x+a)^(1/2)/a^(1/2))*b*x+(b*x+a)^(1/2)*a^(1/2))/x/a^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.18 \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\left [\frac {\sqrt {a} x \log \left (\frac {b x^{2} + 2 \, a x - 2 \, \sqrt {b x^{3} + a x^{2}} \sqrt {a}}{x^{2}}\right ) + 2 \, \sqrt {b x^{3} + a x^{2}}}{x}, \frac {2 \, {\left (\sqrt {-a} x \arctan \left (\frac {\sqrt {b x^{3} + a x^{2}} \sqrt {-a}}{a x}\right ) + \sqrt {b x^{3} + a x^{2}}\right )}}{x}\right ] \]

[In]

integrate((b*x^3+a*x^2)^(1/2)/x^2,x, algorithm="fricas")

[Out]

[(sqrt(a)*x*log((b*x^2 + 2*a*x - 2*sqrt(b*x^3 + a*x^2)*sqrt(a))/x^2) + 2*sqrt(b*x^3 + a*x^2))/x, 2*(sqrt(-a)*x
*arctan(sqrt(b*x^3 + a*x^2)*sqrt(-a)/(a*x)) + sqrt(b*x^3 + a*x^2))/x]

Sympy [F]

\[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\int \frac {\sqrt {x^{2} \left (a + b x\right )}}{x^{2}}\, dx \]

[In]

integrate((b*x**3+a*x**2)**(1/2)/x**2,x)

[Out]

Integral(sqrt(x**2*(a + b*x))/x**2, x)

Maxima [F]

\[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\int { \frac {\sqrt {b x^{3} + a x^{2}}}{x^{2}} \,d x } \]

[In]

integrate((b*x^3+a*x^2)^(1/2)/x^2,x, algorithm="maxima")

[Out]

integrate(sqrt(b*x^3 + a*x^2)/x^2, x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.31 \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\frac {2 \, a \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right ) \mathrm {sgn}\left (x\right )}{\sqrt {-a}} + 2 \, \sqrt {b x + a} \mathrm {sgn}\left (x\right ) - \frac {2 \, {\left (a \arctan \left (\frac {\sqrt {a}}{\sqrt {-a}}\right ) + \sqrt {-a} \sqrt {a}\right )} \mathrm {sgn}\left (x\right )}{\sqrt {-a}} \]

[In]

integrate((b*x^3+a*x^2)^(1/2)/x^2,x, algorithm="giac")

[Out]

2*a*arctan(sqrt(b*x + a)/sqrt(-a))*sgn(x)/sqrt(-a) + 2*sqrt(b*x + a)*sgn(x) - 2*(a*arctan(sqrt(a)/sqrt(-a)) +
sqrt(-a)*sqrt(a))*sgn(x)/sqrt(-a)

Mupad [B] (verification not implemented)

Time = 9.15 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.43 \[ \int \frac {\sqrt {a x^2+b x^3}}{x^2} \, dx=\frac {2\,\sqrt {b\,x^3+a\,x^2}}{x}+\frac {\sqrt {a}\,\mathrm {asin}\left (\frac {\sqrt {a}\,\sqrt {\frac {1}{x}}\,1{}\mathrm {i}}{\sqrt {b}}\right )\,\sqrt {b\,x^3+a\,x^2}\,{\left (\frac {1}{x}\right )}^{3/2}\,2{}\mathrm {i}}{\sqrt {b}\,\sqrt {\frac {a}{b\,x}+1}} \]

[In]

int((a*x^2 + b*x^3)^(1/2)/x^2,x)

[Out]

(2*(a*x^2 + b*x^3)^(1/2))/x + (a^(1/2)*asin((a^(1/2)*(1/x)^(1/2)*1i)/b^(1/2))*(a*x^2 + b*x^3)^(1/2)*(1/x)^(3/2
)*2i)/(b^(1/2)*(a/(b*x) + 1)^(1/2))